export default (fn, time = 1000) => {
  let timer;
  return () => {
    if (timer) return;
    timer = setTimeout(() => {
      fn();
      timer = null;
      console.log(11);
    }, time);
  };
};
